Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-420

Error while comparing float and string value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3
    • 3.4.0
    • None

    Description

      code:

      1.2 == ''

      returns false

       

      code:

      1.2 == 'a'

      causes exception

      Caused by: java.lang.ArithmeticException: Double coercion: (a)

       

      Is it possible to check the right side is a number like string and return false if not?

      Attachments

        Activity

          People

            henrib Henri Biestro
            xupengcheng Xu Pengcheng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: